home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_pyr_snakesarco.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  100 lines

  1. # Jones 3D Cog Script
  2. #
  3. # pyr_snakesarco.cog
  4. #
  5. # Snake sarcophagus under pyramid 1
  6. #
  7. # [RKD]
  8. #
  9. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  10. # ==============================================================================
  11.  
  12. symbols
  13. message        startup
  14. message        activated
  15.  
  16. # world things
  17. thing    sarcophagus        nolink
  18. thing    button
  19. thing    player            local
  20. thing    skeleton
  21.  
  22. # cameras and lookthings
  23. thing    sarcocam    nolink
  24. thing    sarcolook    nolink
  25.  
  26. # surfaces
  27. surface    snakeblock
  28. surface indyblock
  29.  
  30. # animations
  31. keyframe    sarcopen=pyr_srcfgs_snake.key    local
  32.  
  33. # sounds
  34. sound    opensound2=pyr_sarc_open.wav    local
  35.  
  36. # subroutines
  37. flex        opensarc=0.0    local
  38. flex        pushbutton=0.0    local
  39. end
  40.  
  41.  
  42. code
  43. startup:
  44.     sleep(.01);
  45.     
  46.     # light things up
  47.     SetThingLight(skeleton, '25 25 100', .001, .01);
  48.     SetThingLight(button, '25 25 100', .001, .01);
  49.  
  50.     # snakes need to get through this
  51.     SetCollideType(sarcophagus, 0);
  52.  
  53.     # keep snakes at bay, and Indy out of the crawlspace
  54.     ClearAdjoinFlags(snakeblock, 0x2);
  55.     SetAdjoinFlags(indyblock, 0x10);
  56.     return;
  57.  
  58. activated:
  59.     if (GetCurFrame(button) == 1) return;
  60.     
  61.     # freeze indy
  62.     player = GetLocalPlayerThing();
  63.     
  64.     if (MakeMeStop() == -1) return;
  65.     DeselectWeaponWait(player);
  66.  
  67.     StartCutscene(0);
  68.     
  69.     call pushbutton;
  70.     call opensarc;
  71.  
  72.     # alter collisions so snakes and Indy can get through
  73.     SetCollideType(button, 0);
  74.     SetAdjoinFlags(snakeblock, 0x2);
  75.     ClearAdjoinFlags(indyblock, 0x10);
  76.     
  77.     # unfreeze indy
  78.     ClearActorFlags(player, 0x200000);
  79.     EndCutscene();
  80.  
  81.     return;
  82.         
  83. pushbutton:
  84. #    SetCameraInterpSpeed(1, .2);
  85.     SetExtCamOffsetToThing(sarcocam);
  86.     PlayMode(player, 60, 0);
  87.     Sleep(.25);
  88.     MoveToFrame(button, 1, 2);
  89.     return;
  90.  
  91. opensarc:
  92.     sleep(.7);
  93.     PlayKey(sarcophagus, sarcopen, 4, 0x14, 0);
  94.     PlaySoundThing(opensound2, sarcophagus, 1, -1, -1, 0);
  95.     Sleep(1);
  96.     RestoreExtCam();
  97.     return;
  98.     
  99. end
  100.